const mqtt = require("mqtt");
const client = mqtt.connect("mqtt://box.anzhitek.com:8081",{   //  ;175.27.190.12 ；139.224.131.108
  username: "jyq",
  password: "810302",
}); 
 


  function update(buffer) {  
    // console.log("mqtt 已经发送到服务器");
    client.publish("sensorWriter", buffer, { qos: 2, retain: true }); //anzhitekALARM  box.anzhitek.com 
}  
 
module.exports = update;
   